﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using SmallJob.Model;
using SmallJob.Data;
using SmallJob.Services.Interfaces;
using SmallJob.Data.Interfaces;

namespace SmallJob.Services.Implements
{
    public class RequestCommentService : RepositoryBase<RequestComment>, IRequestCommentService
    {
        public RequestCommentService(IDatabaseFactory DBFactory) : base(DBFactory) { }
        public List<RequestComment> GetCommentByRequestID(int id)
        {
            var result = from c in SmallJobDB.RequestComments
                         where c.RequestID == id
                         orderby c.CreatedDate descending
                         select c;
            return result.ToList();
        }
    }
}
